unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, ExtCtrls;

type
  TForm2 = class(TForm)
    ProgressBar1: TProgressBar;
    StaticText1: TStaticText;
    procedure Button2Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);


  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

uses Unit1;

{$R *.dfm}

procedure TForm2.Button2Click(Sender: TObject);
begin
close;
end;





procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  //  form1.tim1.Enabled:=true;
form1.Comm1.StopComm;
 // form1.Enabled:=true;
end;

end.
